﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Order.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.Shop.Order" %>
<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!doctype html>
<html>
<head runat="server">
    <title>订单管理</title>
    <meta charset="utf-8"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <%: Scripts.Render("~/Scripts/AdminBase") %>


    <%: Styles.Render("~/Content/Bootstrap/css") %>



</head>
<body>
<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server"/>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="width: 100%;" border="0" cellpadding="4" cellspacing="0" id="NavigationPath">
                <tr>
                    <td>
                        <asp:Label ID="lblPath" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        搜索：
                        <asp:TextBox ID="txtKeyWord" runat="server"></asp:TextBox>
                        <asp:DropDownList ID="ddlSort" runat="server" EnableViewState="False">
                            <asp:ListItem Value="OrderNum">订单号</asp:ListItem>
                            <asp:ListItem Value="UserName">订货人</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp; &nbsp;<asp:DropDownList ID="ddlStatus" runat="server">
                            <asp:ListItem Value="-1">订单状态</asp:ListItem>
                            <asp:ListItem Value="0">等待确认</asp:ListItem>
                            <asp:ListItem Value="1">已经确认,未付款</asp:ListItem>
                            <asp:ListItem Value="2">已付定金</asp:ListItem>
                            <asp:ListItem Value="3">已经付清</asp:ListItem>
                            <asp:ListItem Value="4">交易成功结束</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;
                        <asp:DropDownList ID="ddlDeliverStatus" runat="server">
                            <asp:ListItem Value="-1">发货状态</asp:ListItem>
                            <asp:ListItem Value="0">未开始配送</asp:ListItem>
                            <asp:ListItem Value="1">配送准备中</asp:ListItem>
                            <asp:ListItem Value="2">已发货</asp:ListItem>
                            <asp:ListItem Value="3">已签收</asp:ListItem>
                            <asp:ListItem Value="99">物流失败</asp:ListItem>
                        </asp:DropDownList>

                        <asp:Button ID="btnSearch" runat="server" Text="搜索" EnableViewState="False" Cssclass="btn btn-default"
                                    OnClick="btnSearch_Click">
                        </asp:Button>
                    </td>
                </tr>
            </table>
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" GridLines="None" CssClass="table table-bordered table-condensed table-hover"
                          DataKeyNames="ID">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <HeaderTemplate>
                            <input name="chkHeader" onclick=" javascript:SelectAll(this); " type="checkbox" value="chkHeader"/>
                        </HeaderTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="单号(点击打开)">
                        <ItemTemplate>
                            <%# MyLink(Eval("OrderNum"), Eval("ID")) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="订购者" DataField="UserName" HeaderStyle-Width="100px"/>
                    <asp:BoundField HeaderText="总金额" DataField="MoneyGoods" DataFormatString="{0:C}"
                                    HeaderStyle-Width="100px">
                        <ItemStyle HorizontalAlign="Right"/>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="付费方式">
                        <ItemTemplate>
                            <%# Eval("PaymentName") %>
                        </ItemTemplate>
                        <HeaderStyle Width="100px"/>
                        <ItemStyle HorizontalAlign="Center"/>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="送货方式">
                        <ItemTemplate>
                            <%# Eval("DeliveryName") %>
                        </ItemTemplate>
                        <HeaderStyle Width="100px"/>
                        <ItemStyle HorizontalAlign="Center"/>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <%# Status(Eval("Status")) %>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center"/>
                        <HeaderStyle Width="100px"/>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="订购时间" DataField="CheckInDate" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}">
                        <HeaderStyle Width="108px"/>
                        <ItemStyle HorizontalAlign="Center"/>
                    </asp:BoundField>
                </Columns>
                <HeaderStyle CssClass="HeaderStyle"/>
            </asp:GridView>
            <div class="WorkArea">
                &nbsp;&nbsp; &nbsp;<asp:Button ID="btnConfirmed" runat="server" Text="确认订单"
                                               Style="cursor: hand" EnableViewState="False"
                                               Cssclass="btn btn-default" onclick="btnConfirmed_Click">
                </asp:Button>
                &nbsp;&nbsp; |&nbsp;&nbsp;<asp:Button ID="btnCancel" runat="server" Text="取消订单" Style="cursor: hand"
                                                      EnableViewState="False" Cssclass="btn btn-default" onclick="btnCancel_Click">
                </asp:Button>
                &nbsp;&nbsp; |&nbsp;&nbsp;<asp:Button ID="btnDelete" runat="server" Text="删除订单" Style="cursor: hand"
                                                      EnableViewState="False" Cssclass="btn btn-default" OnClick="btnDelete_Click"
                                                      OnClientClick=" return confirm('注意，删除后将不可恢复！'); ">
                </asp:Button>
                &nbsp;&nbsp; |&nbsp;&nbsp;
            </div>

            <WinnerCMS:PageNavigation ID="PageNavigation1" runat="server" SubmitButtonclass="btn btn-default"
                                      onpagechanging="PageNavigation1_PageChanging" PageSize="15">
            </WinnerCMS:PageNavigation>

        </ContentTemplate>
    </asp:UpdatePanel>
</form>
</body>
</html>